package com.educate.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author xiongyu
 * @date 2021/10/28 19:05
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class Note {
    /**
     * 笔记id
     */
    private Long noteId;

    /**
     * 笔记标题
     */
    private String title;

    /**
     * 笔记内容
     */
    private String content;

    /**
     * 作者id
     */
    private Long authorId;

    /**
     * 笔记创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd ")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createdNoteTime;

    /**
     * 笔记更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date updatedNoteTime;
}
